import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
import { Base } from '../../base.entity';

@Entity()
export class Category extends Base {

  //所属模块
  @Column({ length: 30, comment: '所属模块' })
  type: string;

  //类别编码
  @Column({ length: 100, comment: '类别编码' })
  category_code: string;

  //类别名称
  @Column({ length: 100, comment: '类别名称' })
  category_name: string;

  //父集ID
  @Column({ default: 0, comment: '父集ID' })
  parent_id: number;

  //状态
  @Column({ default: 0, comment: '状态' })
  status: number;

  //排序
  @Column({ comment: '排序', default: 100 })
  sort_no: number;

  //类别描述
  @Column({ length: 300, comment: '描述', nullable: true })
  category_describe: string;

  //创建人user_id
  @Column({ comment: '创建人user_id' })
  user_id: number;

  //所属商户
  @Column({ comment: '所属商户ID', default: 0, nullable: true })
  business_id: number;

}
